package com.flash.service;

import com.flash.dto.*;
import com.flash.result.PageResult;
import com.flash.vo.OrderPaymentVO;
import com.flash.vo.OrderStatisticsVO;
import com.flash.vo.OrderSubmitVO;
import com.flash.vo.OrderVO;

import java.io.IOException;

public interface OrderService {
    public abstract OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO) throws IOException;

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    public abstract OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    public abstract void paySuccess(String outTradeNo);

    /**
     * 取消订单
     * @param id
     */
    public abstract void cancel(Long id);

    /**
     * 查询订单详情
     * @param id
     * @return
     */
    public abstract OrderVO orderDetail(Long id);

    /**
     * 查询历史订单
     * @param page
     * @param pageSize
     * @param status
     * @return
     */
    public abstract PageResult getPageResult(int page, int pageSize, Integer status);

    /**
     * 再来一单功能
     * @param id
     */
    public abstract void repetition(Long id);

    public abstract PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);

    public abstract OrderStatisticsVO statistics();

    public abstract void confirm(OrdersConfirmDTO ordersConfirmDTO);

    public abstract void rejection(OrdersRejectionDTO ordersRejectionDTO);

    /**
     * 商家取消订单
     *
     * @param ordersCancelDTO
     */
    public abstract void cancel(OrdersCancelDTO ordersCancelDTO) throws Exception;

    /**
     * 派送订单
     *
     * @param id
     */
    public abstract void delivery(Long id);

    /**
     * 完成订单
     *
     * @param id
     */
    public abstract void complete(Long id);

    /**
     * 客户催单
     * @param id
     */
    public abstract void reminder(Long id);
}
